import { postRequest } from '@/api/easyRequest'

export const changePwd = (params: { userName: string; password: string }) => {
    return postRequest('/editpwd', params)
}

export const editInfo = (params: {
    userName: string
    nickName: string
    age: number
    gender: string
    phone: string
}) => {
    return postRequest('/editinfo', params)
}

export const uploadImg = function (data: any) {
    return postRequest(
        '/upload',
        data,
        {},
        {
            headers: {
                'Content-Type': 'multipart/form-data'
            }
        }
    )
} as any
